﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="JqueryAndAjaxPro.aspx.cs" Inherits="_jquery_JqueryAndAjaxPro" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <script src="../../js组件/jquery/jquery-latest-pack.js" type="text/javascript"></script>
 <script type="text/javascript">
jQuery.noConfict();//将$引用的对象映射回原始的对象，让渡变量$
// Can not use AJaxpro and Jquery same page
</script>
<title>_jquery_JqueryAndAjaxPro Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="LinqDataSource1" 
            DataTextField="ClaName" DataValueField="ClaId">
    </asp:DropDownList>
        <br />
        <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
            ContextTypeName="Linq_SQLServeDataContext" Select="new (ClaId, ClaName)" 
            TableName="M_AskClasses" Where="ClaName != @ClaName">
            <whereparameters>
                <asp:parameter DefaultValue="" Name="ClaName" Type="String" />
            </whereparameters>
        </asp:LinqDataSource>
        <input id="Text1" onkeydown="this.value=this.value.replace(/[^\d]/g,'')" type="text" /><br />
        ^放在[]里面是为不是相当于 !=
        <span>
        sdfsd<br />
        </span>
        df</div>
    </form>
    
    <script type="text/javascript">
    alert(jQuery("select>option").each(
     function(i)
     {
         this.style.background=["#ff00ee","#0eaae8","green"][i%3]
     }
    ));
    </script>
</body>
</html>
